package com.cms.service.impl;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cms.dao.AdminDao;
import com.cms.entity.Admin;
import com.cms.service.AdminService;


@Service(value="adminService")
public class AdminServiceImpl implements AdminService {
	
	private AdminDao adminDao;
	

	//@Override
	public Admin get(Serializable id) {
		return adminDao.find(id, Admin.class);
	}

	//@Override
	public void delete(Serializable id) {
		adminDao.delete(id, Admin.class);
	}

	//@Override
	public void save(Admin entity) {
		adminDao.save(entity);
	}

	//@Override
	public void update(Admin entity) {
		adminDao.update(entity);
	}

	//@Override
	public Admin login(String username, String password) {
		return adminDao.login(username, password);
	}

	
	
	
	public AdminDao getAdminDao() {
		return adminDao;
	}
	@Autowired
	public void setAdminDao(AdminDao adminDao) {
		this.adminDao = adminDao;
	}
	
	
}
